using System.ComponentModel.DataAnnotations;
using Crux.Core.Dapper.Attributes;
using Crux.Core.Dapper.Attributes.Joins;
using Crux.Core.Dapper.Attributes.LogicalDelete;

namespace Crux.Core.Dapper.Test;
[Table("test_soft_delete_model")]
public class TestSoftDeleteModel
{
    [Key]
    [Column("id")]
    [Identity]
    public long Id { get; set; }
    /// <summary>
    ///
    /// </summary>
    [Column("user_name")]
    public string UserName { get; set; } = string.Empty;
    [Column("modifyd_at")]
    [UpdatedAt]
    public DateTime ModifydAt { get; set; }
    //bool型的软删除
    // [Status,Deleted]
    // public bool IsDeleted { get; set; }
    [Status]
    [Column("status")]
    public TestStatus Status { get; set; }

    [LeftJoin("TestModel", "Id", "Id", "test")]
    public TestModel? TestModel { get; set; }
}